package pvc

import (
	"kms-backend/controllers/pvc"

	"github.com/gin-gonic/gin"
)

// 新增
func create(pvcGroup *gin.RouterGroup) {
	pvcGroup.POST("/create", pvc.Create)
}

// 更新
func update(pvcGroup *gin.RouterGroup) {
	pvcGroup.POST("/update", pvc.Update)
}

func detail(pvcGroup *gin.RouterGroup) {
	pvcGroup.GET("/detail", pvc.Detail)
}

func list(pvcGroup *gin.RouterGroup) {
	pvcGroup.GET("/list", pvc.List)
}

func delete(pvcGroup *gin.RouterGroup) {
	pvcGroup.POST("/delete", pvc.Delete)
}

func RegisterSubRouter(g *gin.RouterGroup) {
	// 配置路由策略
	pvcGroup := g.Group("/pvc")
	create(pvcGroup)
	update(pvcGroup)
	detail(pvcGroup)
	list(pvcGroup)
	delete(pvcGroup)

}
